
const modules = import.meta.glob('./modules/*.js', { eager: true });

const api = Object.keys(modules).reduce((acc, path) => {
  const moduleName = path.match(/\.\/modules\/(.*)\.js$/)[1];
  acc[moduleName] = modules[path].default;
  return acc;
}, {});

export default api;